package com.ssh.entity;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.apache.struts2.json.annotations.JSON;

@Entity
public class Activity extends BaseEntity{
	private static final long serialVersionUID = 8089935656259480557L;
	private String subject;
	private String content;
	private Timestamp startDate;
	private Timestamp endDate;
	private Timestamp createDate;
	private Integer del;
	private Brand brand;

	public Activity() {
	}
	
	@ManyToOne(cascade ={CascadeType.ALL},fetch = FetchType.LAZY)       
    @JoinColumn(name="brandId")  
	public Brand getBrand() {
		return brand;
	}


	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	public String getSubject() {
		return this.subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	@JSON(format="yyyy-MM-dd")
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Timestamp startDate) {
		this.startDate = startDate;
	}
	@JSON(format="yyyy-MM-dd")
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Timestamp endDate) {
		this.endDate = endDate;
	}
	@JSON(format="yyyy-MM-dd") 
	public Date getCreateDate() {
		return this.createDate;
	}
	
	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Integer getDel() {
		return this.del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}

}